<?php
class DateTextField extends CWidget {
	/*	
		name:
		value:
		htmlOptions:
		label:
			value:
			htmlOptions:	
	*/	
	
	public $name;
	public $value;	
	public $label = array(
		"value"=>"",
		"htmlOptions"=>"",
	);
	public $htmlOptions;
		
	public function init(){
		//$this->defOptions["value"] = date("d-M-Y");	
		//$this->defOptions["name"] = $this->options["id"];		
		//$this->options = array_merge($this->defOptions,$this->options);
		$val = Yii::app()->request->getParam($this->name,$this->value);
		if ($val ==""){
			$this->value =date("d-M-Y");
		}		
		$this->label = array_merge(array("value"=>"","htmlOptions"=>""),$this->label);	
	}
	
    public function run() {
		$this->render('dateTextField');
    }
}
?>